package com.cawis.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cawis.entity.Flash;
import com.cawis.mapper.FlashMapper;
import com.cawis.service.FlashService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FlashServiceImpl extends ServiceImpl<FlashMapper, Flash> implements FlashService {

    @Override
    public Page selectPage(String startTime, String endTime, Integer current, Integer pageSize) {
        QueryWrapper qw = new QueryWrapper();
        qw.between("timedate", startTime, endTime);
        Page page = baseMapper.selectPage(new Page(current, pageSize), qw);
        return page;
    }

    @Override
    public List<Map<String, Object>> dataList(String listName, Integer lineId) {
        return this.baseMapper.dataList(listName, lineId);
    }

}
